package cn.iocoder.yudao.module.project.dal.mysql.productprocesscompleted;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.project.dal.dataobject.productprocesscompleted.ProductProcessCompletedDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.project.controller.admin.productprocesscompleted.vo.*;
import org.apache.ibatis.annotations.Param;

/**
 * 产品完成工序 Mapper
 *
 * @author 管理员
 */
@Mapper
public interface ProductProcessCompletedMapper extends BaseMapperX<ProductProcessCompletedDO> {

    default PageResult<ProductProcessCompletedDO> selectPage(ProductProcessCompletedPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ProductProcessCompletedDO>()
                .eqIfPresent(ProductProcessCompletedDO::getOrderId, reqVO.getOrderId())
                .eqIfPresent(ProductProcessCompletedDO::getInternalCode, reqVO.getInternalCode())
                .eqIfPresent(ProductProcessCompletedDO::getProductionCode, reqVO.getProductionCode())
                .eqIfPresent(ProductProcessCompletedDO::getType, reqVO.getType())
                .betweenIfPresent(ProductProcessCompletedDO::getLastCollectionTime, reqVO.getLastCollectionTime())
                .likeIfPresent(ProductProcessCompletedDO::getDeptName, reqVO.getDeptName())
                .eqIfPresent(ProductProcessCompletedDO::getDeptId, reqVO.getDeptId())
                .eqIfPresent(ProductProcessCompletedDO::getDeliveryStatus, reqVO.getDeliveryStatus())
                .betweenIfPresent(ProductProcessCompletedDO::getDeliveryFinishTime, reqVO.getDeliveryFinishTime())
                .eqIfPresent(ProductProcessCompletedDO::getRemark, reqVO.getRemark())
                .betweenIfPresent(ProductProcessCompletedDO::getCreateTime, reqVO.getCreateTime())
                .eqIfPresent(ProductProcessCompletedDO::getCreator, reqVO.getCreator())
                .eqIfPresent(ProductProcessCompletedDO::getLen, reqVO.getLen())
                .orderByDesc(ProductProcessCompletedDO::getId));
    }


}